package parser;

import antlr.Token;
import antlr.RecognitionException;

abstract class Stmt {

    int line;

    abstract void write(ByteStream out) throws RecognitionException;

    protected Stmt() {
        yields = false;
        deletes = false;
    }

    Stmt returns() {
        return new StmtPair(this, new ReturnStmt(Expr.NONE, 0));
    }

    void line(Token t) {
        this.line = t.getLine();
    }

    String docString() {
        return null;
    }

    boolean yields;
    boolean deletes;

}
